home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 18 / CU Amiga Magazine's Super CD-ROM 18 (1997)(EMAP Images)(GB)[!][issue 1998-01].iso / CUCD / Programming / AmigaE / Src / Rkrm / Exec_Library / Semaphores / semaphore.e
Text File  |  1995-03-31  |  290b  |  14 lines

  1. -> semaphore.e - Exec semaphore example
  2.  
  3. MODULE 'exec/semaphores'
  4.  
  5. PROC main()
  6.   DEF lockSemaphore:ss
  7.   InitSemaphore(lockSemaphore)
  8.   ObtainSemaphore(lockSemaphore)   -> Task now owns the semaphore.
  9.  
  10.   -> ...
  11.  
  12.   ReleaseSemaphore(lockSemaphore)  -> Task has released the semaphore.
  13. ENDPROC
  14.